$(".search").click(function () {
    var data = $("#searchform").serialize();
    window.location.href = '/admin/suggest/index?' + data;
});

/**删除***/
$("#info_delete").click(function () {
    var act = $(this).attr('id');
    var value = new Array();
    $("tbody span[class='checked'] input").each(function (a, b) {
        value[a] = 'id=' + $(this).val();
    });
    var ids = value.join('&');
    var confirm_msg = "确认删除吗?";
    if(ids==''){
        dshow('请选择至少一条数据进行操作');
        return false;
    }
    if (confirm(confirm_msg)) {
        $.ajax({
            url: '/admin/suggest/delIndex',
            type: 'POST',
            data: {ids: ids, act: act},
            dataType: 'JSON',
            cache: false,
            success: function (json) {
                dshow(json.message);
                if (json.code == 2000) {
                    window.location.href = '/admin/suggest/index';
                }
            }
        });
    }
});
/***查看**/
$(".detail").click(function () {
    var id = $(this).attr('data-id');
    var page = $("input[name='page']").val();
    window.location.href = '/admin/suggest/detail?page=' + page + '&id=' + id;
});

/***回复**/
$(".reply").click(function () {
    var id = $(this).attr('data-id');
    var page = $("input[name='page']").val();
    window.location.href = '/admin/suggest/reply?page=' + page + '&id=' + id;
});